package kr.or.kosta.otr.persistence.profession;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.annotation.Resource;

import kr.or.kosta.otr.vo.ProfessionVO;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;

@Repository("ProfessionDao")
public class ProfessionDaoImpl implements ProfessionDao {
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	
	@Override
	public ArrayList<ProfessionVO> getAllProfession() throws SQLException {
		return (ArrayList<ProfessionVO>)sqlMapClient.queryForList("Profession.getAllProfession");
	}

	@Override
	public ProfessionVO getProfession(HashMap<String, Object> map) throws SQLException {
		return (ProfessionVO)sqlMapClient.queryForObject("Profession.getProfession", map);
	}

}
